<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:th="http://www.thymeleaf.org">

<head>

    <meta charset="utf-8"/>
    <title>添加员工</title>

    <meta content="width=device-width, initial-scale=1.0" name="viewport"/>
    <meta content="" name="description"/>
    <meta th:content="${session.authorities}" id="authority"/>

    <!-- BEGIN GLOBAL MANDATORY STYLES -->
    <link href="/media/css/bootstrap.min.css" rel="stylesheet" type="text/css"/>
    <link href="/media/css/bootstrap-responsive.min.css" rel="stylesheet" type="text/css"/>
    <link href="/media/css/font-awesome.min.css" rel="stylesheet" type="text/css"/>
    <link href="/media/css/style-metro.css" rel="stylesheet" type="text/css"/>
    <link href="/media/css/style.css" rel="stylesheet" type="text/css"/>
    <link href="/media/css/style-responsive.css" rel="stylesheet" type="text/css"/>

    <link rel="stylesheet" type="text/css" href="/media/css/datepicker.css"/>

    <link rel="stylesheet" href="/media/ztree/css/bootstrapStyle/bootstrapStyle.css" type="text/css">
    <link rel="shortcut icon" href="/media/image/favicon.ico"/>

    <style>
        .permission {
            display: inline-block;
        }

        .permission a {
            text-decoration: none;
        }
    </style>
</head>

<!-- END HEAD -->

<!-- BEGIN BODY -->

<body>
<div class="page-content" style="margin: 0 50px;">

    <div class="row-fluid">
        <div class="span12" style="padding: 5px 10px;">
            <!-- BEGIN FORM-->
            <form class="form-horizontal" id="staff_add_form">
                <div class="row-fluid">
                    <div class="span6">
                        <div class="control-group">
                            <label class="control-label">系统账号:</label>
                            <div class="controls">
                                <input type="text" class="m-wrap span7" name="userName" required><span
                                    class="help-inline" style="color: red;">*登录系统使用</span>
                            </div>
                        </div>
                    </div>
                    <!--/span-->
                    <div class="span5">
                        <div class="control-group">
                            <label class="control-label">Email:</label>
                            <div class="controls">
                                <input type="text" class="m-wrap span7" name="staffEmail" required>
                                <span class="help-inline" style="color: red;">*</span>
                            </div>
                        </div>
                    </div>
                </div>
                <!--/row-->
                <div class="row-fluid">
                    <div class="span6">
                        <div class="control-group">
                            <label class="control-label">真实姓名:</label>
                            <div class="controls">
                                <input type="text" class="m-wrap span7" name="staffRealName" required><span
                                    class="help-inline" style="color: red;">*</span>
                            </div>
                        </div>
                    </div>
                    <div class="span4">
                        <div class="control-group">
                            <label class="control-label">状态:</label>
                            <div class="controls">
                                <select class="m-wrap span10" name="staffState">
                                    <option value="0">请选择</option>
                                    <option value="1">在职</option>
                                    <option value="5">离职</option>
                                    <option value="2">兼职</option>
                                    <option value="3">实习</option>
                                    <option value="4">冻结</option>
                                </select>
                            </div>
                        </div>
                    </div>


                    <!--/span-->
                </div>
                <div class="row-fluid">
                    <div class="span6">
                        <div class="control-group">
                            <label class="control-label">手机号码:</label>
                            <div class="controls">
                                <input type="text" class="m-wrap span7" name="staffPhone" required>
                                <span class="help-inline" style="color: red;">*</span>
                            </div>

                        </div>
                    </div>
                    <div class="span4">
                        <div class="control-group">
                            <label class="control-label">入职时间:</label>
                            <div class="controls">
                                <div class="input-append date date-picker"
                                     data-date-format="yyyy-mm-dd" data-date-viewmode="years">
                                    <input class="m-wrap m-ctrl-medium date-picker" readonly=""
                                           size="16" type="text" value="" name="staffJoinTime"><span
                                        class="add-on"><i class="icon-calendar"></i></span>
                                </div>
                            </div>
                        </div>
                    </div>
                </div>
                <div class="row-fluid">
                    <div class="span6">
                        <div class="control-group">
                            <label class="control-label">所属部门:</label>
                            <div class="controls">
                                <select class="m-wrap span7" name="staffDepartment">
                                    <option value="0">请选择</option>
                                    <option value="1" th:each="dept:${departments}"
                                            th:value="${dept.id}" th:text="${dept.deptName}">市场部
                                    </option>

                                </select>
                            </div>
                        </div>
                    </div>
                    <div class="span4">
                        <div class="control-group">
                            <label class="control-label">QQ:</label>
                            <div class="controls">
                                <input type="text" class="m-wrap span10" name="staffQq">

                            </div>

                        </div>
                    </div>
                </div>
                <div class="row-fluid">
                    <div class="span6">
                        <div class="control-group">
                            <label class="control-label">员工岗位:</label>
                            <div class="controls">
                                <select class="m-wrap span7" name="staffPosition">
                                    <option value="0">请选择</option>
                                    <option value="2" th:each="position:${positions}"
                                            th:value="${position.id}" th:text="${position.positionName}">离职
                                    </option>
                                </select>
                            </div>
                        </div>
                    </div>
                    <div class="span6">
                        <div class="control-group">

                            <div class="controls">

                                <label class="checkbox">

                                    <div class="checker">
                                        <span><input type="checkbox" value="1" name="isAdviser"></span>
                                    </div>
                                    是否顾问

                                </label> <label class="checkbox">

                                <div class="checker">
											<span><input type="checkbox" value="1"
                                                         style="margin-left: -14px;" name="isTeacher"></span>
                                </div>
                                是否老师

                            </label> <label class="checkbox">

                                <div class="checker">
											<span><input type="checkbox" value="1"
                                                         style="margin-left: -14px;" name="isMarketPerson"></span>
                                </div>
                                是否市场人员

                            </label>

                            </div>
                        </div>
                    </div>
                </div>
                <hr>
                <div class="row-fluid">
                    <div class="span12">
                        <div class="control-group">
                            <label class="control-label">员工权限:</label>
                            <div class="controls">
                                <div class="permission" th:each="role:${roles}">
                                    <input type="radio" value="" th:value="${role.id}"
                                           name="staffPermission" th:checked="${role.roleCode} eq 'ADMIN'"> <a th:text="${role.roleName}"
                                                                      th:attr="data-id=${role.id}">老师</a>
                                </div>
                            </div>
                        </div>
                    </div>
                </div>
                <hr>
                <div class="row-fluid">
                    <div class="span12">
                        <div class="control-group">
                            <label class="control-label">拥有学员:</label>
                            <div class="controls">
                                <div class="row-fluid">
                                    <div class="permission">
                                        <span>潜在学员：</span>
                                    </div>
                                    <div class="permission" th:each="m:${valid}">
                                        <input type="checkbox" th:value="${m.id}" name="hasStudent"> <a
                                            th:text="${m.stateParam}">老客户</a>
                                    </div>

                                </div>
                                <div class="row-fluid">
                                    <div class="permission">
                                        <span>无效学员：</span>
                                    </div>
                                    <div class="permission" th:each="m:${invalid}">
                                        <input type="checkbox" th:value="${m.id}" name="hasStudent"> <a
                                            th:text="${m.stateParam}">老客户</a>
                                    </div>
                                </div>
                                <div class="row-fluid">
                                    <div class="permission">
                                        <span>会 员：</span>
                                    </div>
                                    <div class="permission" th:each="m:${member}">
                                        <input type="checkbox" th:value="${m.id}" name="hasStudent"> <a
                                            th:text="${m.stateParam}">老客户</a>
                                    </div>
                                </div>

                            </div>
                        </div>
                    </div>
                </div>
                <hr>
                <div class="row-fluid">
                    <div class="span12">
                        <div class="control-group">
                            <label class="control-label">备注信息</label>
                            <div class="controls">
                                <textarea class="span6 m-wrap" rows="5" name="staffRemark"></textarea>
                            </div>
                        </div>
                    </div>
                </div>
            </form>
        </div>
    </div>
    <!-- 		权限树的弹框 -->
    <div class="row-fluid" style="display: none;" id="per_tree">
        <div calss="span6 text-center">
            <ul id="treeEdit" class="ztree"></ul>
        </div>
    </div>
</div>


<!-- BEGIN CORE PLUGINS -->
<script src="/media/js/jquery-1.10.1.min.js" type="text/javascript"></script>
<script src="/media/js/jquery-migrate-1.2.1.min.js"
        type="text/javascript"></script>
<script src="/media/js/bootstrap.min.js" type="text/javascript"></script>

<script type="text/javascript"
        src="/media/ztree/js/jquery.ztree.core.js"></script>
<script type="text/javascript"
        src="/media/ztree/js/jquery.ztree.excheck.js"></script>
<script type="text/javascript" src="/media/js/jquery.validate.min.js"></script>
<script type="text/javascript" src="/media/layer/layer.js"></script>

<script src="/media/js/app.js"></script>

<script type="text/javascript" src="/media/js/bootstrap-datepicker.js"></script>
<script type="text/javascript"
        src="/media/js/bootstrap-datepicker.zh-CN.js"></script>
<script src="/media/js/staffadd.js"></script>


<script>
    jQuery(document).ready(function () {
        App.init();
        StaffAdd.init();
    });
</script>
</body>

</html>